package com.tj.collection.controller.lending.response;

import com.fqgj.common.api.ResponseData;
import com.fqgj.common.utils.CollectionUtils;
import com.tj.collection.service.dto.ClAgentsVo;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/9/10
 * Time: 下午8:56
 */
public class ClAdminResponse implements ResponseData {

    private List<Item> itemList = new ArrayList<>();

    public ClAdminResponse(List<ClAgentsVo> clAgentsVoList) {
        if (CollectionUtils.isEmpty(clAgentsVoList)) {
            return;
        }
        itemList = new ArrayList<>();
        for (ClAgentsVo clAgentsVo : clAgentsVoList) {
            Item item = new Item();
            item.setFollowId(clAgentsVo.getAdminId().longValue());
            item.setName(clAgentsVo.getName());
            itemList.add(item);
        }
    }

    class Item {
        private Long followId;
        private String name;

        public Long getFollowId() {
            return followId;
        }

        public Item setFollowId(Long followId) {
            this.followId = followId;
            return this;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

}
